package me.yushuai.wukong.base.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/**
 * 更新系统配置信息的传输对象
 *
 * @author zhoushuai@189.cn
 * @since 2022-09-13
 */
@Data
@ToString
@EqualsAndHashCode
public class UpdateConfGroupDTO {
    /**
     * 代码ID
     */
    @Null(message = "conf.groupId.NotFound")
    private Long groupId;

    /**
     * 代码编码
     */
    @NotEmpty(message = "conf.bizId.NotNull")
    @Length(max = 40, message = "conf.bizId.Length")
    private String bizId;

    /**
     * 中文描述
     */
    @NotEmpty(message = "conf.confNameCh.NotNull")
    @Length(max = 40, message = "conf.confNameCh.Length")
    private String confNameC;

    /**
     * 英文描述
     */
    @NotEmpty(message = "conf.confNameEn.NotNull")
    @Length(max = 40, message = "conf.confNameEn.Length")
    private String confNameE;

    /**
     * 长度
     */
    @Min(value = 1, message = "conf.confLength.Min")
    @Max(value = 999, message = "conf.confLength.Max")
    private Integer confLength;

    /**
     * 代码类型
     */
    @NotEmpty(message = "conf.confType.NotNull")
    @Length(max = 40, message = "conf.confType.Length")
    private String codeType;

    /**
     * 是否可修改
     */
    @NotNull(message = "conf.modifyFlag.NotNull")
    private Boolean modifyFlag;

    /**
     * 自定义1
     */
    @Length(max = 40, message = "conf.udf1.Length")
    private String udf1;

    /**
     * 自定义2
     */
    @Length(max = 40, message = "conf.udf2.Length")
    private String udf2;

    /**
     * 自定义3
     */
    @Length(max = 40, message = "conf.udf3.Length")
    private String udf3;

}